Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TESTING: parse_tests files should be uniformly formatted and sorted #3272

Closed
wants to merge 16 commits into from

Conversation

tlimoncelli
Copy link
Contributor

@tlimoncelli tlimoncelli commented Dec 28, 2024

Issue

The format of files in pkg/js/parse_tests are inconsistent, which makes refactoring difficult.

A future refactoring will cause these tests to fail because the .Records lists will be in a different order (order is unimportant). Currently the data is in the same order as the records are input. In the future, the ordering will be different. The order of .Records doesn't matter, thus this test data is brittle.

Solutions:

  • All .js files are passed through dnscontrol fmt -i x -o x
  • All .json files are passed through fmtjson
  • The .Records in .json files are now PrettySort'ed, so that the order is predictable.
  • The .Records in .json files are now post processed. They are the final JSON (this will be important when the new rtype system comes in)

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes detected by Check Git Status Action

@tlimoncelli tlimoncelli closed this Jan 3, 2025
@tlimoncelli tlimoncelli deleted the tlim_rtype_20_sorttestresults branch January 3, 2025 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant